<%= form_for(@user) do |f| %>
  <% if @user.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>

      <ul>
      <% @user.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :login %><br />
    <%= f.text_field :login %>
  </div>
  <div class="field">
    <%= f.label :password %><br />
    <%= f.password_field :password %>
    <%= f.password_field :password_confirmation%>
  </div>
  <div class="field">
    <%= f.label :mail %><br />
    <%= f.text_field :mail %>
  </div>
  <% if current_user && current_user.admin? %>
  <div class="field">
    <%= f.label :admin %><br />
    <%= f.check_box :admin %>
  </div>
  <% end %>
  <div class="field">
    <%= f.label :mail_notification %><br />
    <%= f.check_box :mail_notification %>
  </div>

  <div class="field">
    <%#= f.label :salt %><br />
    <%#= f.text_field :salt %>
  </div>


  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
